package com.ruoyi.project.system.smsnotice.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.system.smsnotice.domain.SmsNotice;
import com.ruoyi.project.system.smsnotice.mapper.SmsNoticeMapper;
import com.ruoyi.project.system.smsnotice.service.ISmsNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 短信通知Service业务层处理
 * 
 * @author LCL
 * @date 2020-12-22
 */
@Service
public class SmsNoticeServiceImpl implements ISmsNoticeService 
{
    @Autowired
    private SmsNoticeMapper smsNoticeMapper;

    /**
     * 查询短信通知
     * 
     * @param id 短信通知ID
     * @return 短信通知
     */
    @Override
    public SmsNotice selectSmsNoticeById(String id)
    {
        return smsNoticeMapper.selectSmsNoticeById(id);
    }

    /**
     * 查询短信通知列表
     * 
     * @param smsNotice 短信通知
     * @return 短信通知
     */
    @Override
    public List<SmsNotice> selectSmsNoticeList(SmsNotice smsNotice)
    {
        return smsNoticeMapper.selectSmsNoticeList(smsNotice);
    }

    /**
     * 新增短信通知
     * 
     * @param smsNotice 短信通知
     * @return 结果
     */
    @Override
    public int insertSmsNotice(SmsNotice smsNotice)
    {
        return smsNoticeMapper.insertSmsNotice(smsNotice);
    }

    /**
     * 修改短信通知
     * 
     * @param smsNotice 短信通知
     * @return 结果
     */
    @Override
    public int updateSmsNotice(SmsNotice smsNotice)
    {
        return smsNoticeMapper.updateSmsNotice(smsNotice);
    }

    /**
     * 删除短信通知对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSmsNoticeByIds(String ids)
    {
        return smsNoticeMapper.deleteSmsNoticeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除短信通知信息
     * 
     * @param id 短信通知ID
     * @return 结果
     */
    @Override
    public int deleteSmsNoticeById(String id)
    {
        return smsNoticeMapper.deleteSmsNoticeById(id);
    }

    @Override
    public SmsNotice findAll() {
        return smsNoticeMapper.findAll();
    }
}
